using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

  public class Startup
    {
        public async Task<object> Invoke(dynamic options)
        {
            return await Task.Run(() =>
            {
            return new
            {
                open = (Func<object, Task<object>>)(
                     async (input) =>
                     {
                         return this.Open((string)input);
                     }),
                fetch = (Func<object, Task<object>>)(
                     async (input) =>
                     {
                         return this.Fetch((string)input);
                     })
            };
            });
        }

        public string Open(string name)
        {
            return "打开了："+name;
        }

        public string Fetch(string name)
        {
            return "正在获取：" + name;
        }

    }

